<div class="panel panel-box">
    <div class="panel-heading">
        <?php if ($this->titleName) : ?>
        <div class="titleimage">
            <h3 class="panel-title panel-title-font">
                <?php echo $this->titleName?>
                <a href="<?php echo yii::app()->baseUrl.$this->more_url?>"><span class="pull-right fontcolor">+更多</span></a>
            </h3>
        </div>
        <?php endif; ?>
    </div>
    <ul class="list-group">
        <?php for($i = 0;$i < ((count($this->model) > $this->count) ? $this->count : count($this->model));$i++):?>
        <?php $elem = $this->model[$i]?>
        <li class="list-group-item"><span class="glyphicon glyphicon-book"></span>
            <a href="<?php echo yii::app()->baseUrl.$elem['view_url']?>">

            <?php 
        $content = strip_tags($elem['title']);
        if (mb_strlen($content, 'utf-8') > $this->wordslimit)
        {
            echo mb_substr($content, 0, $this->wordslimit, 'utf-8') . "...";
        }
        else
        {
            echo $content;
        }
                ?>
            </a>
        </li>
        <?php endfor;?>
    </ul>
</div>
